<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Facade</title>
</head>
<body>
<script>
var addMyEvent=function(el,ev,fn){
    if(el.addEventListener){
        el.addEventListener(ev,fn,false);
    }else if(el.attachEvent){
        el.attachEvent('on'+ev,fn);
    }else{
        el['on'+ev]=fn;
    }
}
</script>
</body>
</html>